package com.hulu.househappy.interceptor;

//import kgc.alipay.pojo.User;
import org.apache.log4j.Logger;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.registry.infomodel.User;

public class SysInterceptor extends HandlerInterceptorAdapter {
	private Logger logger = Logger.getLogger(SysInterceptor.class);
	
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception{
		logger.debug("SysInterceptor preHandle ==========================");
		User user = (User) request.getSession().getAttribute("user");
		if(user==null){
			return false;
		}
		return true;
	}
}
